package com.leinao.media.common.param;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;
import java.util.List;

/**
 * 视频下载参数
 *
 * @author zhangyu
 * @date 2022/2/8 14:39
 */
public class VideoDownloadParam extends BaseDeviceParam {

    /**
     * 通道号
     */
    private Integer channel;

    /**
     * 下载参数集
     */
    private List<DownloadParam> downloadParamList;

    /**
     * uuid
     */
    private String uuid;

    /**
     * 下载参数
     */
    public static class DownloadParam {

        /**
         * 文件名
         */
        private String fileName;

        /**
         * 开始时间
         */
        @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
        private Date startTime;

        /**
         * 结束时间
         */
        @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
        private Date endTime;

        /**
         * 保存路径
         */
        private String saveAddress;

        public String getFileName() {
            return fileName;
        }

        public void setFileName(String fileName) {
            this.fileName = fileName;
        }

        public Date getStartTime() {
            return startTime;
        }

        public void setStartTime(Date startTime) {
            this.startTime = startTime;
        }

        public Date getEndTime() {
            return endTime;
        }

        public void setEndTime(Date endTime) {
            this.endTime = endTime;
        }

        public String getSaveAddress() {
            return saveAddress;
        }

        public void setSaveAddress(String saveAddress) {
            this.saveAddress = saveAddress;
        }

        @Override
        public String toString() {
            return "DownloadParam{" +
                    "fileName='" + fileName + '\'' +
                    ", startTime=" + startTime +
                    ", endTime=" + endTime +
                    ", saveAddress='" + saveAddress + '\'' +
                    '}';
        }
    }

    public Integer getChannel() {
        return channel;
    }

    public void setChannel(Integer channel) {
        this.channel = channel;
    }

    public List<DownloadParam> getDownloadParamList() {
        return downloadParamList;
    }

    public void setDownloadParamList(List<DownloadParam> downloadParamList) {
        this.downloadParamList = downloadParamList;
    }

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    @Override
    public String toString() {
        return "VideoDownloadParam{" +
                "channel=" + channel +
                ", downloadParamList=" + downloadParamList +
                ", uuid='" + uuid + '\'' +
                '}';
    }
}
